
function userLogin()           
{
	if (document.all.form1.loginName.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u60a8\u7684\u7528\u6237\u540d!");
		document.all.form1.loginName.focus();
		return false;
	}
	else if (!isValidAccountPass(document.all.form1.loginName.value))
	{
		alert("\u60a8\u586b\u5199\u7684\u7528\u6237\u540d\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5305\u542b\u4e86\u7cfb\u7edf\u4e0d\u5141\u8bb8\u7684\u5b57\u7b26\uff01\n\n\u5982\u9700\u5e2e\u52a9\u81f4\u7535\u5ba2\u670d\u4e2d\u5fc30755-27749250\u5de5\u4f5c\u4eba\u5458\u4e3a\u60a8\u66f4\u6362\u7528\u6237\u540d\uff01");
		document.all.form1.loginName.focus();
		return false;
	}
	if (document.all.form1.loginPassword.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u5bc6\u7801!");
		document.all.form1.loginPassword.focus();
		return false;
	}
}

function corporLogin()
{
	if (document.all.form2.loginName.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u60a8\u7684\u7528\u6237\u540d!");
		document.all.form2.loginName.focus();
		return false;
	}
	else if (!isValidAccountPass(document.all.form2.loginName.value))
	{
		alert("\u60a8\u586b\u5199\u7684\u7528\u6237\u540d\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5305\u542b\u4e86\u7cfb\u7edf\u4e0d\u5141\u8bb8\u7684\u5b57\u7b26\uff01\n\n\u5982\u9700\u5e2e\u52a9\u81f4\u7535\u5ba2\u670d\u4e2d\u5fc30755-27749250\u5de5\u4f5c\u4eba\u5458\u4e3a\u60a8\u66f4\u6362\u7528\u6237\u540d\uff01");
		document.all.form2.loginName.focus();
		return false;
	}
	if (document.all.form2.loginPassword.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u5bc6\u7801!");
		document.all.form2.loginPassword.focus();
		return false;
	}
}

function onsiteLogin()
{
	if (document.all.form3.loginName.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u60a8\u7684\u7528\u6237\u540d!");
		document.all.form3.loginName.focus();
		return false;
	}
	else if (!isValidAccountPass(document.all.form3.loginName.value))
	{
		alert("\u60a8\u586b\u5199\u7684\u7528\u6237\u540d\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5305\u542b\u4e86\u7cfb\u7edf\u4e0d\u5141\u8bb8\u7684\u5b57\u7b26\uff01\n\n\u5982\u9700\u5e2e\u52a9\u81f4\u7535\u5ba2\u670d\u4e2d\u5fc30755-27749250\u5de5\u4f5c\u4eba\u5458\u4e3a\u60a8\u66f4\u6362\u7528\u6237\u540d\uff01");
		document.all.form3.loginName.focus();
		return false;
	}
	if (document.all.form3.loginPassword.value=="")
	{
		alert("\u8bf7\u8f93\u5165\u5bc6\u7801!");
		document.all.form3.loginPassword.focus();
		return false;
	}
}

function CheckPassword()           
{
	alert("\u5982\u679c\u60a8\u7684\u7528\u6237\u540d\u5fd8\u8bb0\u6216\u5bc6\u7801\u4e22\u5931\uff0c\n\n\u81f4\u7535\u5ba2\u670d\u4e2d\u5fc3(0755-27749250)\u5de5\u4f5c\u4eba\u5458\u5c06\u4f1a\u5e2e\u60a8\u627e\u56de\u7528\u6237\u540d\u6216\u4fee\u6539\u4e3a\u65b0\u7684\u5bc6\u7801\u3002")
}

function isValidAccountPass(s) 
{
	if (s.length == 0) return false;
	var regu = "^[0-9A-Za-z_-]*$";
	var re   = new RegExp(regu);
	if (s.search(re) != -1)
		return true;
	else
    {
         return false;
    }
}

function checkDate(d){
	if(d.length == 0) return false;
	var reg = "^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29))$";
	var re   = new RegExp(reg);
	if (d.search(re) != -1)
		return true;
	else
    {
         return false;
    }
}